// 独立页面
const Login = () => import('@/views/login.vue')
// 主框架容器
const Layout = () => import('@/components/layout/index.vue')
// 框架内页面
const NotFound = () => import('@/views/404.vue')
const Home = () => import('@/views/home/index.vue')

const routes = [
  {
    path: '/login',
    name: '登录',
    component: Login
  },
  {
    path: '/',
    component: Layout,
    children: [
      {
        path: '/:pathMatch(.*)*',
        name: '404',
        component: NotFound,
        meta: {
          keepAlive: true
        }
      },
      {
        path: '/home',
        name: '首页',
        component: Home,
        meta: {
          hideTag: false, // 是否隐藏tag标签
          parent: '', // 父级路由地址 当隐藏标签时使用
          keepAlive: true
        }
      }
    ]
  }
]

export default routes
